package com.zsx.shopping.coupon.controller;

import com.zsx.shopping.common.api.R;
import com.zsx.shopping.common.api.coupon.vo.SeckillSessionVO;
import com.zsx.shopping.coupon.service.SeckillSessionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/coupon/seckillSession")
public class SeckillSessionController {

    @Resource
    private SeckillSessionService seckillSessionService;

    @GetMapping("/latest3DaySession")
    public R<List<SeckillSessionVO>> getLatest3DaySession() {
        return R.success(seckillSessionService.getLatest3DaySession());
    }
}
